package com.agan.aganjavaspyder.crawler.ct_demo;

import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.spider.HtmlBean;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * @author agan
 * @ClassName PhoneDto
 * @Description
 * @Date 2020/10/19 1:28 下午
 **/

@Setter
@Getter
@ToString
@Gecco(matchUrl="http://www.189.cn/products/{salesCode}.html?internal_search=1",pipelines = {
        "consolePipeline","JsonPhontPipeline" })
public class PhoneDto implements HtmlBean {

    @RequestParameter("salesCode")
    private String salesCode;

    @Text
    @HtmlField(cssPath = "#mall_price")
    private String price;

    @Text
    @HtmlField(cssPath = "#articleshorttitle")
    private String name;

    @Image
    @HtmlField(cssPath="#spxx_con_null > p:nth-child(1) > img")
    private String pic;

    @Text
    @HtmlField(cssPath = "body > div.main_div.fix > div.mainRight > div.cdma_type_Box > form > div:nth-child(15) > div.specRightPart > a.hover > font")
    private String color;

    @Text
    @HtmlField(cssPath = "body > div.main_div.fix > div.mainRight > div.cdma_type_Box > form > div:nth-child(16) > div > a.hover > font")
    private String storage;

}
